﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Common;
using ExpenseSystem.Common.BaseModel;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Model;
using ExpenseSystem.Core.DataAddOn;
using System.Web;

namespace ExpenseSystem.Core.ServiceOrderModules
{
    public abstract class ServiceOrderDetailManager:INormalManager<ServiceOrderDetailModel>
    {
        protected ServiceOrderDetailManager()
        {
            profile = Authority.Authority.GetUserProfile();
        }
        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected UserProfile profile;
        public static ServiceOrderDetailManager CreateInstance()
        {
            return new ServiceOrderDetailBaseManager();
        }
        protected NormalDataUpdater<ServiceOrderDetailModel> ServiceOrderDetailUpdater = new ServiceOrderDetailUpdaterRegister().GetServiceOrderDetailUpdater();

        public abstract bool Delete( ServiceOrderDetailModel ServiceOrderDetail, out string message);
        public abstract bool DeleteById( long[] ServiceOrderDetailId,  out string message);
        public abstract bool Save(ServiceOrderDetailModel ServiceOrderDetail,  out string message,params IAddable<ServiceOrderDetailModel>[] addable);
    }
}
